Skip to content

[SmartSwitch] Adding backward compatibility for feature "enable/disable vxlan sport filtering"#23207

Merged
prsunny merged 1 commit intosonic-net:masterfrom
congh-nvidia:vxlan_src_port
Apr 1, 2026
Merged

[SmartSwitch] Adding backward compatibility for feature "enable/disable vxlan sport filtering"#23207
prsunny merged 1 commit intosonic-net:masterfrom
congh-nvidia:vxlan_src_port

Conversation

@congh-nvidia
Copy link
Copy Markdown
Contributor

Description of PR

Summary:
The feature test PR #22908 is merged to master branch, however the feature itself has not been merged to sonic image.
The test_dash_privatelink.py and test_dash_smartswitch_vnet.py are broken due to this.
Adding a backward compatible method in both tests to make them work also without the feature, and skip the dedicated test case test_privatelink_udp_sport_range_negative before the feature is present.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Approach

What is the motivation for this PR?

Adding backward compatibility for feature "enable/disable vxlan sport filtering"

How did you do it?

  1. Adding a backward compatible method by configuring the sport range and the vxlan_security separately. If the feature is not in the image, the range config can still be applied to the dut and the vxlan_security won't be applied due to the attribute is not supported yet.
  2. Skip test case test_privatelink_udp_sport_range_negative, will remove the skip after the feature is merged.

How did you verify/test it?

Run the test_dash_privatelink.py and test_dash_smartswitch_vnet.py on SN4280 testbed with image that doesn't include the feature, all passed.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Config the port range and vxlan_security seperately, if the feature is
not in the image, the range config can still be applied to the dut and
the vxlan_security won't take effect.

Signed-off-by: Cong Hou <[email protected]>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Collaborator

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — correct backward-compat split for VXLAN sport/security config. Skip condition for unavailable feature is well-justified. CI all green.

@yxieca
Copy link
Copy Markdown
Collaborator

yxieca commented Mar 31, 2026

@congh-nvidia why are you adding the fix and skip the test case at the same time?

@congh-nvidia
Copy link
Copy Markdown
Contributor Author

congh-nvidia commented Apr 1, 2026

@congh-nvidia why are you adding the fix and skip the test case at the same time?

Hi @yxieca , the fix is for the test case dash/test_dash_privatelink.py::test_privatelink_basic_transform and test_dash_smartswitch_vnet.py, the skip is for test case dash/test_dash_privatelink.py::test_privatelink_udp_sport_range_negative. Before the feature itself is merged, we should skip the negative test. I will remove the skip when the feature is present.

@prsunny prsunny merged commit c0f961e into sonic-net:master Apr 1, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants